//
//  Base.swift
//  WanAndroidLearn
//
//  Created by TRS-Mobile on 2023/11/1.
//

import Foundation
import SmartCodable

// MARK: - WanResponseData
struct WanResponseData<T: SmartCodable>: SmartCodable {
    var data: ResponsePageData = ResponsePageData<T>()
    var errorCode: Int = 0
    var errorMsg: String = ""
}

struct WanListResponseData<T: SmartCodable>: SmartCodable {
    var data: [T] = []
    var errorCode: Int = 0
    var errorMsg: String = ""
}

// MARK: - ResponsePageData
struct ResponsePageData<T: SmartCodable>: SmartCodable {
    var curPage: Int = 0
    var datas: [T] = []
    var offset: Int = 0
    var over: Bool = false
    var pageCount: Int = 0
    var size: Int = 0
    var total: Int = 0
}
